home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / dtp / hwgpost / history.lha / History
Encoding:
Text File  |  1996-07-10  |  68.8 KB  |  1,250 lines

  1. #
  2. # $Id: History,v 1.28 1996/07/10 10:52:59 heinz Exp $
  3. #
  4.  
  5. This is the history from the original 1.7 source up to now in chronological
  6. order. Releases follow the changes done. The most recent notes are
  7. at the end of the file.
  8.  
  9.         - took the original 1.7 sources and added my own fixes.
  10.  
  11.     2.0 HWG internal
  12.  
  13.         - SAS/C 6.x compatibility
  14.         - Added 24 bit capabilites. Note that any of the 24 plane ptrs can
  15.           be set to NULL to achieve "partial" rendering of bitplanes. This
  16.           way you can render e.g. a 300 dpi A4 24 bit image one plane
  17.           at a time even on a small machine doing 24 passes. Afterwards you
  18.           could combine the planes on HD to a full image. This seems to be
  19.           easier than rendering clips with a depth of 24 bit.
  20.         - sethalftonephase.
  21.         - integrated Tom Rokicki's fixes.
  22.         - handling of illegal type 3 encodings (well sort of).
  23.  
  24.  
  25.     2.1 HWG still not public
  26.  
  27.         - After a virtual memory restore the current font setup was totally
  28.           messed up, which resulted in a invalidfont error in the best case.
  29.           Worse cases were possible.
  30.           I fixed this by removing a few global (Yuck!) font variables and
  31.           integrating them into the graphics state. As a side effect calls
  32.           to show are now faster.
  33.         - For errstackoverflow and errdictstackoverflow the stacks were not
  34.           cleared as the should be according to Adobe.  The fix for the
  35.           operandstack is complete. For the dictstack and execstack there
  36.           might be still a problem. I currently have no idea how to solve
  37.           multiple stack overflows and the Adobe manual doesn't really tell
  38.           what should happen if the execution stack runs over its limit.
  39.         - For the first time I put it into RCS.
  40.  
  41.     22  HWG still not public
  42.  
  43.         - The new local/global VM scheme seems to be working now.
  44.           The dictstack is like in a level 2 implementation now.
  45.           The overhead needed triggers an increase of memory use of about
  46.           80% for all objects. I don't see a way to reduce this if I want
  47.           to keep going to level 2. No idea yet on how to implement a nice
  48.           garbage collection without adding _major_ overhead to object
  49.           handling. At least a restore does a true memory free now.
  50.         - New operators: setglobal, currentglobal, gcheck, scheck,
  51.                          glyphshow, <<, >>, undef, arct,
  52.                          setstrokeadjust, currentstrokeadjust,
  53.                          setbbox.
  54.  
  55.         - Neither setbbox nor the strokeadjust stuff is tested.
  56.         - The strokeadjust stuff doesn't really do a decent strokeadjust
  57.           currently. It is more of an experiment right now.
  58.         - GlobalFontDirectory is now there, (Shared variant, too).
  59.         - putinterval now deals with packed arrays.
  60.         - execstack now correctly clears the attributes for all copied
  61.           objects.
  62.         - dictionaries conform to level 2 now and expand as needed.
  63.         - undef is implemented. It doesn't reduce the dictionary size. It
  64.           just invalidates the entry. (Note: This is not a typenull!)
  65.         - null is no longer an operator but a constant.
  66.         - The complete system name table according to the adobe reference
  67.           manual appendix F is now implemented.
  68.         - The object types are now numbered according to the red book,
  69.           page 113, table 3.14.
  70.         - Hashing in nametoken() should be a little faster now.
  71.         - clippath will no longer return an empty clipping path. Instead
  72.           it will return a zero area path at (0,0) device space.
  73.         - <~ASCII85~> implemented, not tested.
  74.         - Some speedups in scantoken.
  75.         - Only PaintTypes 0 and 2 are accepted now, not tested.
  76.         - CDevProc handling put in, not tested.
  77.         - added 'a' and '+' modes to file opening, not tested.
  78.         - defineuserobject/undefineuserobject/execuserobject, not tested.
  79.         - filter mechanism in place, eexec runs on top of it now.
  80.           dct, ccittfax, and lzw filters missing, proc and string input not
  81.           tried.
  82.         - Real BlueValues with a zero fractional part are now accepted to
  83.           allow use of broken fonts.
  84.         - /loadfont in init.ps discards garbage on the operand stack left
  85.           by the font.
  86.         - filenameforall implemented. I need this functionality for the
  87.           resource ops. Limited testing.
  88.         - setobjectformat, currentobjectformat implemented. Not tested.
  89.         - error handling should be pretty much level 2 compliant now
  90.           except for "binary" and stackoverflow handling inside the error
  91.           handler itself. Not really tested.
  92.           stackoverflow handling inside the error functions is a nasty one,
  93.           as we don't have Level 2 compliant expanding stacks. This
  94.           actually doesn't matter, as even a "true" level 2 interpreter
  95.           could run out of memory in that situation. It seems to be an
  96.           obscure and undefined case. I handle it my way. At least it
  97.           should not crash.
  98.         - character showing could be a little faster now. Hashing for
  99.           it does not need multiplications anymore. It uses shifts and
  100.           additions.
  101.         - status should handle a string arg now. Not tested.
  102.         - renamefile, deletefile, fileposition, setfileposition
  103.           implemented. Not tested.
  104.  
  105.     22.3 HWG still not public
  106.  
  107.         - callextfunc now no longer public. It is nasty stuff anyway.
  108.         - Now the names @vmhwm, @prompts instead of vmhwm, prompts.
  109.         - many internal speedups and simplifications. Don Knuth said that
  110.           "premature optimization is the root of all evil.". This is of
  111.           course true, but I mainly cleaned up quite some code to make
  112.           it more readable to me and "reduced" definitely unneeded type
  113.           sizes. The speedups came as a positive side effect, though they
  114.           are probably not that noticeable with standard PostScript code.
  115.         - imaging and filling now in separate source files. It was all too
  116.           big IMHO.
  117.         - For displays with less than 100 dpi on at least one axis, a
  118.           default halftone frequency of 30 instead of 60 is chosen now.
  119.           This gives at least some halftoning on screen as default which
  120.           makes many pictures look much nicer. I am not sure that this
  121.           conforms to the B&W book where it is said that 60 is returned as
  122.           default, but it gives better results for B.J.User. So what the
  123.           heck ...
  124.         - When grestore behaves like a noop because there is nothing to
  125.           restore, the halftone screens are no longer invalidated.
  126.         - copy is now level 2 compliant for dictionaries. No attribute
  127.           changes anymore for the destination.
  128.         - There was some unlogical code in calclogicaldepth (pun intended)
  129.           which IMHO could have failed under special circumstances. Should
  130.           be safer now.
  131.         - When closing an eexec file, the dictstack is popped only if there
  132.           is sysdict on top of it. Anything else is silently ignored to
  133.           avoid recursion caused by the error handler (which can cause
  134.           files to be closed, too).
  135.         - Implemented a ForceBold mechanism for type 1 fonts. If
  136.           ForceBold is true and a stem would be rendered 1 pixel wide
  137.           because its width is >= 1.3 and < 1.5 it will be thickened to two
  138.           pixels. 1.3 seems to give visually acceptable results. 1.25
  139.           as limit for rounding up looks pretty unreadable already.
  140.  
  141.     22.4 HWG still not public
  142.  
  143.         - StdXW and StemSnapX implemented. "Snapping" should work when the
  144.           delta to the actual width is less than 1.0 _pixel_.
  145.         - Implemented FamilyBlues and FamilyOtherBlues.
  146.         - selectfont is now built in and behaves correctly.
  147.         - Major rework of the font machinery to help adding the composite font
  148.           extensions. Now most of the vars needed for rendering are cached
  149.           at setfont time. I trade memory for speed.
  150.  
  151.     22.5 HWG still not public
  152.  
  153.         - Moved the ForceBold limit up to 1.4. 1.3 just doesn't look too good.
  154.         - Major rework of the font caching. The font cache size can now be
  155.           changed (needed for setcacheparams) and with a tiny little change
  156.           the efficiency of the font cache has gone up it seems.
  157.         - Implemented setcacheparams, currentcacheparams.
  158.  
  159.     22.6 HWG still not public
  160.  
  161.         - Setup internals for the implementation of User Parameters. This causes
  162.           changes to VM handling, font handling, and the interpreter stack setup.
  163.           All other values are currently noops.
  164.         - currentuserparams, setuserparams, setvmthreshold implemented.
  165.           Currently we don't have any garbage collection. So the value you set with
  166.           setvmthreshold does nothing.
  167.  
  168.     22.7 HWG still not public
  169.  
  170.         - Somewhere in 22.7 I went to SAS/C 6.51.
  171.  
  172.     22.8 HWG still not public
  173.  
  174.         - xshow, yshow, xyshow implemented. Seem to work well.
  175.         - missing flush in error message output added.
  176.         - rectfill, rectclip, rectstroke.
  177.         - half a ton of const keywords added to many functions.
  178.         - setgstate, gstate, currentgstate. Not tested.
  179.         - forall should no longer enumerate read protected keys.
  180.           I am not exactly sure that this is correct behaviour, though.
  181.         - kshow resets the current font after executing the proc if
  182.           necessary.
  183.         - findresource will behave as in a "small memory" situation as
  184.           Adobe names it. That is, it will never fiddle with the VM mode
  185.           even for type 3 fonts, unlike e.g. Display PostScript does
  186.           according to Adobe.
  187.         - moved definefont and undefinefont over to using resource
  188.           primitives. I don't even know right now if it will compile. ;^)
  189.           Uhm, as you see, undefinefont should be available now, too.
  190.         - Implemented @RegisterDiskResource to tell HWGPOST what external
  191.           resources are available.
  192.         - findfont is using resources now, too.
  193.         - init.ps is setting up the disk resources now!
  194.         - eexec should behave like run now. It should automatically close
  195.           the file it creates on EOF _and_ on any other termination! This
  196.           should fix "{eexec} stopped" like constructs which used to leave
  197.           systemdict on the dictionary stack.
  198.         - findfont, definefont, and undefinefont are now defined in terms
  199.           of resource operators as described in the R&W book.
  200.         - ISOLatin1Encoding, StandardEncoding, and findencoding are now
  201.           defined in terms of resource operators as described in the R&W
  202.           book.
  203.         - Split up font handling and show handling even more. Another
  204.           source file postshow.c is now available.
  205.  
  206.     22.9 HWG still not public
  207.  
  208.         - minor cosmetic reworks in some publically visible files
  209.  
  210.     22.10 HWG first public beta release
  211.  
  212.         - currentcolortransfer returned garbage. Should be fixed now.
  213.         - Internal preparations for setting up color spaces!
  214.         - setcolor implemented. Not tested.
  215.         - setoverprint. Note that this is a no op currently!
  216.         - currentoverprint.
  217.         - created postcolor.c with all the colorspace handling stuff.
  218.         - Family[Other]Blues check still had a bug that showed with the "d"
  219.           of the Times-Italic I have here. Should be fixed now.
  220.         - I commented out the halftonephase ops for now. This will need
  221.           much work _after_ patterns are done. Any halftonephase != 0 will
  222.           probably slow done rendering a lot then.
  223.         - sethalftone, currenthalftone, general halftone dictionary
  224.           support. Not tested at all.
  225.         - This just came to mind. Did I mention that the scanner no longer
  226.           uses the isspace() macro, but truly checks according to the R&W
  227.           book specs for white space? This has been in there for quite some
  228.           time.
  229.         - Added provision for true CMYK rendering into the bitplanes
  230.           instead of RGBW on the fly. This has actually been done
  231.           earlier already, but now it is enabled. Not tested.
  232.         - For the pattern color space, I need a masking feature. So I
  233.           enhanced the device structure to provide for a mask.
  234.         - Big problems with the image ops and handling of the Decode array
  235.           fixed. It wasn't decoded correctly anyway and it wasn't used at
  236.           all for gray scale devices.
  237.         - A missing flush in effect mixed error output and output
  238.           by e.g. =, ==, pstack in an inappropriate way.
  239.  
  240.     22.11 HWG internal
  241.  
  242.         - /version should be a string now. Sorry for the inconvenience.
  243.         - curveto with the same start and end point now works as intended.
  244.         - pathforall now copies the path into an internal buffer before
  245.           enumerating it. This way changes to the current path while
  246.           pathforall is active no longer hurt the result.
  247.         - Commented out sethalftone/currenthalftone and setcolor for now.
  248.           They are not fully functional yet, and their presence might
  249.           confuse valid PostScript files.
  250.         - Serious bug in handling of parameters for the image operators
  251.           resulted in errors for 8 bits per sample. Found this by accident
  252.           only. :-(
  253.  
  254.     22.12 HWG release for NOVA.
  255.  
  256.         - True halftone phase support is back. It should be general enough
  257.           to be a base for patterns. Rendering of halftone screens is
  258.           slower now than before. I might add a special optimized halftone
  259.           function for standard filling though that runs fast for any x
  260.           shift of 0 or by a multiple of 8 pixels.
  261.         - Fixed a bug that could possibly mess up halftoning for very
  262.           small vertical rendering. Never noticed this though.
  263.         - Added deviceinfo to make /processcolors in statusdict easier.
  264.           processcolors has been added, too (In init.ps!). Why I did this
  265.           now? I just got news about /processcolors and before I forget
  266.           about it, I add it.
  267.         - Bookman-Light showed me a possible problem with eexec decoding.
  268.           Though I think that Bookman-Light actually violates type 1 font
  269.           specs, I added special code to the file handling to work around
  270.           the problem for IBM font style binary encoded eexec portions.
  271.           The above is a euphemism for "hack added to make ugly stuff
  272.           work".
  273.  
  274.           Note: Anyone complaining about a font not working is required to
  275.                 provide me with a legal copy of the font for my own use
  276.                 from now on. Argh!
  277.  
  278.           Sidenote: Bookman-Light 001.003 is buggy according to Adobe. In
  279.                     001.004, the problem is supposedly fixed.
  280.  
  281.         - Work on Separation/Indexed colorspaces to get all the interfaces
  282.           for patterns set up. Tricky and not yet visible to the user.
  283.           Probably not for a while.
  284.         - To get best performance and memory use for any halftoning or
  285.           patterns, you should have a width of the cell that is a multiple
  286.           of eight device pixels. Any halftone phase other than a multiple
  287.           of eight will slow down cell rendering. Any width other than
  288.           a multiple of eight will (sometimes considerably) increase memory
  289.           use. This is especially important for users of halftone
  290.           dictionaries. The cell will be replicated in x direction until a
  291.           byte aligned width is achieved. So e.g. for a 9 pixel wide cell,
  292.           the actual internal width and memory requirement will be 9 * 8 ==
  293.           72 pixel per line, which can be evenly divied by 8. If I did not
  294.           do it like that, rendering would not take long, but forever.
  295.           Actually it is not a new invention. The default halftone screens
  296.           always did it like that. I used this for halftone screens
  297.           specified via dictionaries only, and I have reason to assume that
  298.           I'll need it for patterns.
  299.         - eexec reworked again. It now uses a destructor to pop the system
  300.           dictionary. The file handling is back to normal. No strange stack
  301.           handling within closing of files anymore. I feel that this is
  302.           good news.
  303.         - Interesting enough, the eexec rework led me to a problem with the
  304.           implementation of resource ops while debugging. Tricky
  305.           manual stack manipulation after a resource op caused an error
  306.           could cause a crash. Should be robust now.
  307.         - setdevparams, currentdevparams. They are dummies that don't do
  308.           very much. setdevparams will always give an error and
  309.           currentdevparams returns an empty dictionary.
  310.         - Reworked halftone validating mechanism in my quest for patterns.
  311.           I made it look more "black box" for the callers which should help
  312.           me a lot in the future. As a side effect a few unnecessary
  313.           invalidations of halftone screens could be removed.
  314.         - Color handling behaves better now, too. Setting a colorspace and
  315.           setting the colors is much cleaner internally now and colors will
  316.           be only set once not twice for every colorspace/color change. Oh
  317.           well. Not exactly true. sethsbcolor will first set the colorspace
  318.           and with that the initial color, and then the requested hsb color
  319.           will be set. That is what you get for using strange stuff.
  320.         - I'll have to design a general bitmap caching scheme within the VM
  321.           handling. This will cover hopefully characters, patterns, and
  322.           forms. Maybe I can even do something about user paths then, but I
  323.           doubt it. While thinking about this and looking at the current
  324.           font cache handling, I could fix a possible hole in font type
  325.           checking and improve VM efficiency with save/restore
  326.           combinations. Strange how things hang together sometimes.
  327.         - For the Pattern color space, the font cache will be ignored. A
  328.           rendering function would be needed that I am not willing to
  329.           design to support rendering of the font cache in any reasonable
  330.           way. So with patterns all characters will be rendered the slow
  331.           way.
  332.         - The interrupt signals will be checked now in '=', '==', and in
  333.           'pstack'. While doing this, I added correct defines for the
  334.           signals to postlib.h. I added defines for the garbage collection
  335.           that does not yet exist, too.
  336.         - Changed style of error display to something supposedly much more
  337.           Adobe like.
  338.         - Changed rounding factors for setstrokeadjust to 0.25, i.e. I use
  339.           the 1/4 method suggested in "PostScript by Example". Should give
  340.           slightly better results. Why didn't I think of that in the first
  341.           place?
  342.         - Interesting enough there was a bug in VM save/restore handling.
  343.           restore would not correctly restore things in all circumstances
  344.           because marking of allocations was off by one.
  345.         - Handling and closing of the currentfile was not exactly "ok". It
  346.           should work better now, and currentfile should never return
  347.           "wrong" file handles. Uhm well, if no file exists, currentfile
  348.           will return %stdin to return something. There is not really a
  349.           concept of an invalid file object.
  350.         - There should no longer be any "hanging" file open calls when an
  351.           error occurs. When a file is closed, it is closed now. No fake
  352.           close handling anymore to keep the interpreter happy. I
  353.           originally missed a paragraph in the R&W book saying how it works
  354.           and messed it up. Now it is done right (I hope).
  355.         - Time for a freeze.
  356.  
  357.     22.13 HWG internal
  358.  
  359.         - Threshold halftoning was ... uhm ... totally broken. It should
  360.           work now. This paragraph doesn't tell how much time I spent on it.
  361.           As a positive side effect of the rework, the halftone cache is
  362.           now smarter. Going from black to white shold be as fast now
  363.           as going from white to black when asking for halftones.
  364.         - sethalftone is now available.
  365.         - Still a "typo" in the new error message format corrected.
  366.         - There could still be "hanging" file open calls when the execution
  367.           stack was popped, e.g. on error or quit. Now any files
  368.           encountered while popping the execution stack will be closed.
  369.           This should help a lot.
  370.         - Note: kshow does not create a loop context currently! I'll fix
  371.           this when I am into composite fonts. I'll need to invest some
  372.           thought into this. Colorspaces are still first on my list.
  373.         - BTW, if you guys out there want CIE color spaces, buy a decent
  374.           book on the subject, and send it to me. The R&W book isn't all
  375.           that clear, and afterall it would be nice if I didn't have to
  376.           spend all my money on this. :-) If nothing like this happens, CIE
  377.           color spaces won't come soon.
  378.         - In systemdict you will now find /=string with a length of 128.
  379.         - Added the destructor concept to vm restore handling to make cache
  380.           flushing independent of vm handling.
  381.         - name table handling is now more black box, too. I need all this
  382.           black box handling to implement the new general caching scheme.
  383.           A small change to the hashing in name token seems to have helped
  384.           lookup performance.
  385.         - Added @calluserhook. Not tested yet.
  386.  
  387.             mark <args> <hookadr> <msgadr> @calluserhook
  388.  
  389.             ==>
  390.  
  391.             mark <resargs> <resint>
  392.  
  393.           ints, reals, bools, or strings may be used as args with a maximum
  394.           number of 8 arguments. The values are put into an array of longs
  395.           that is passed as object address to the hook. For strings two
  396.           slots in the array are used for address and length. On return the
  397.           values of ints, bools, and reals will be copied back into the
  398.           internal PS objects. The called function runs on the context of
  399.           post.library and might need to set up A4 from e.g. hook->h_Data
  400.           to make use of its local near data segment. No assumptions may be
  401.           made about post.library's context! It is private stuff!
  402.  
  403.           All this should help people needing to interface to external code
  404.           a lot.
  405.  
  406.         - The new general caching scheme is in place now. While it has more
  407.           overhead than the old font cache, there does not seem to be a
  408.           performance hit as hashing and caching is a little smarter.
  409.         - For blue values any reals are now accepted and converted to
  410.           integers.
  411.         - Some cleanup to the font and show handling for the new caching
  412.           scheme.
  413.         - exit always had a bug. It would look below the lower end of the
  414.           exec stack. One object too much. Ouch.
  415.         - kshow now has a loop context that can be exited via exit. I don't
  416.           have composite fonts yet, sorry.
  417.         - While testing pattern generation, I found that gstate object
  418.           handling was in fact totally broken. The paths were not saved
  419.           correctly. This works now. Otherwise patterns would not work.
  420.         - Patterns seem to work now. Please note that patterns are sort of
  421.           slow to render because there is a lot of work to do for this
  422.           including floating point calculations when a cached pattern is
  423.           imaged onto the page. Patterns are also memory hungry. If you know
  424.           the bounding box in device space (i.e. in pixels of the
  425.           bitplane!), you can estimate how much memory patterns eat. They
  426.           use bitplanes in the size of the bounding box. One mask bitplane
  427.           is always needed and for colored patterns you'll need one
  428.           pattern bitplane per device bitplane. Currently there is no
  429.           setsystemparams call and the maximum amount of bytes for the
  430.           pattern cache is ~60K. As we don't have a garbage collection yet,
  431.           allocated memory for the pattern cache will stay allocated until
  432.           it is either reused or invalidated by a VM restore.
  433.         - Hopefully not too many bugs lurk inside pattern handling. BELIEVE
  434.           ME, PATTERNS ARE TRICKY TO HANDLE!
  435.         - As I said above, drawing characters with patterns does not use
  436.           the font cache and probably never will. It is slower of course
  437.           but it works the same and doesn't add tons of special handling
  438.           to rendering.
  439.         - Corrected a sign bug that messed up 360 degree arcs with arcn.
  440.           This one has been in there since at least 1.7. I found this while
  441.           testing patterns.
  442.  
  443.     22.14 HWG the pattern freeze.
  444.  
  445.         - The band rendering operators are now named "@currentband" and
  446.           "@setband". To keep compatibility to old post.library usage, I
  447.           added a kludge to init.ps to define the old names in terms of the
  448.           new names. Using the old names is strongly discouraged, though!
  449.         - Oh well, I forgot to mention that the masking feature contained
  450.           in the struct PSextdevice works and may be used. If it wouldn't
  451.           be working, patterns would not work at all.
  452.         - An interesting comment on the side is that the interpreter source
  453.           is still fairly portable even with those many changes. So if I
  454.           was ever to find a computer with a better OS than the Amiga, I
  455.           could take the interpreter with me. Don't fear anything, though.
  456.           There isn't any better OS around for me as far as I can see.
  457.         - Cleaned up names for extended PSsignalint() flags.
  458.         - Added missing PSerrstr prototype and pattern cache default sizes.
  459.  
  460.     22.15 HWG
  461.  
  462.         - Just found a bug when testing the release version. Font caching
  463.           would not work correctly.
  464.         - I totally forgot to mention that XUID's should work for fonts and
  465.           patterns.
  466.  
  467.     22.16 HWG Pattern Release BETA2
  468.  
  469.         - resourcestatus did not update the operand stack correctly. So you
  470.           did not get the expected results.
  471.         - Negative setdash offsets should work now and give results that
  472.           make some sense.
  473.         - In some cases there was too much clipping done when rendering
  474.           images. The bug was in there at least since post 1.7.
  475.         - Some PS files are checking /version and replace buggy operators
  476.           depending on this information. Of course HWGPOST does not have
  477.           any bugs, ;^) so I had to rework the "version"/"revision" setup.
  478.           /version is now an arbitrary number (50) and /revision is derived
  479.           from the library version number. For HWGPOST 22.16 it is e.g.
  480.           22016. Suggestions for a better /version choice are welcome.
  481.         - A comment on pattern rendering. Due to the current imaging model,
  482.           a pattern must be cacheable. Patterns that do no fit into the
  483.           pattern cache will cause an error. In addition to this behaviour
  484.           the "MaxPatternItem" user parameter is not checked currently.
  485.         - The image operators had some bugs. The first one had been in
  486.           there since the beginning of time. It caused placement and sizing
  487.           problems with images by one pixel. They were due to a
  488.           misinterpretation of filling rules for image data. This should be
  489.           fixed now. Images are now much more handled like standard fills
  490.           which makes handling them a lot safer and clearer.
  491.           The second bug had been introduced by me when the new rendering
  492.           scheme for patterns was put in. Untransformed images that map to
  493.           the page in a 1:1 scale were not at all rendered. The best one
  494.           could hope for was a gray or white area in the image's size.
  495.           Actually this bug was the major reason to work towards a beta 3
  496.           really soon, because not fixing it would have made the beta 2 for
  497.           e.g. "dvips" applications or faithful bitmap rendering useless.
  498.         - If a disk resource is not registered, the /ResourceFileName entry
  499.           in the implementation dictionary is now checked if available. The
  500.           implications of this feat are staggering. ;^) Transparent
  501.           adaptive resource lookup by checking different paths is now
  502.           possible via /ResourceFileName. This makes for nice font lookup.
  503.           Note that this obviously can't affect resourceforall because
  504.           there is no way for this operator to "guess" where a
  505.           /ResourceFileName implementation would look and what resoure
  506.           names would be appropraiet for filenames found. So resourceforall
  507.           will only return registered resources. I doubt that there is a
  508.           good way to implement a general file search for resourceforall
  509.           that could handle e.g. all the different styles of font names
  510.           possible and all sorts of different directories. While
  511.           directories could be handled via a "path" concept, alias names
  512.           for fonts cannot. They needed to be registered. In this case one
  513.           could register the font directly anyway so there is nothing lost
  514.           by the current implementation. A special HWGPOST feature is that
  515.           /ResourceFileName may return a zero length string. This counts as
  516.           "not available/known". It not only speeds up processing a little
  517.           but provides for a more "natural" error handling.
  518.  
  519.           Net result is, that findresource might be able to find things
  520.           that resourceforall does not list, if /ResourceFileName is used.
  521.  
  522.         - For the daring: I put in some code into the image handling to
  523.           support 12 bits per sample. Not tested at all yet. Anything can
  524.           happen.
  525.         - Added rootfont. Until composite font support is done, it will be
  526.           in effect equivalent to currentfont.
  527.         - Nobody ever noticed it before, but the scanner had a limited
  528.           understanding of the "newline" concept when skipping comment
  529.           lines.
  530.         - defineresource sets the /Category entry properly now.
  531.         - While resource file stunts can be played now via
  532.           /ResourceFileName, this alone would be rather cumbersome. An
  533.           internal resource lookup scheme is now implemented that makes
  534.           defining a search path for any type of disk based resource rather
  535.           easy. Resource lookup is now done like this:
  536.  
  537.             1. When registered use the registered filename. Done.
  538.             2. Check if (%ENV%HWGPOST/PATH_<category>) exists. If so:
  539.                 a) Parse this file for prefix/suffix combinations to try
  540.                    on the resource name. If a filename can be generated
  541.                    where the file exists, consider the resource to be
  542.                    found. Use this filename. Done.
  543.             3. Check /ResourceFileName if available. Use any non zero
  544.                length return string as filename. If so, done.
  545.             4. Fail. The resource can't be found if you get this far.
  546.  
  547.           A demonstration PATH_FONT file to be copied into
  548.           (%ENVARC%HWGPOST) is supplied. Refer to it for further
  549.           information.
  550.  
  551.           As with /ResourceFileName, there is no support for resourceforall
  552.           because there does not seem to be a way to revert back to
  553.           resource names when scanning directories.
  554.         - As you can see, HWGPOST makes use of environment variables for
  555.           the first time, now. They'll all be in a subdirectory "HWGPOST"
  556.           to keep them in one place.
  557.  
  558.     22.17 HWG
  559.  
  560.         - I postponed the beta 3 release to implement resource file
  561.           lookup into resourceforall, too. resourceforall will now check
  562.           the environment variable (%ENV%HWGPOST/PATH_<category>) just like
  563.           findresource. On any resourceforall call, all supplied path
  564.           prefixes and suffixes will be scanned with a PostScript file
  565.           pattern of (*) to enumerate all possible files. Then a list is
  566.           built of all the filenames stripped down by the length of the
  567.           prefix and suffix to give resource names suitable for
  568.           findresource. resourceforall will then continue to work as usual,
  569.           enumerating local and global resources. Then the preregistered
  570.           disk resources will be enumerated and finally the entries in the
  571.           just scanned resource file list.
  572.  
  573.           This new behaviour has some side effects and consequences. the
  574.           file scan cannot check the contents of the file. So any file
  575.           encountered within the resource path will be listed as available
  576.           resource, whatever it is. So keep your resource directories CLEAN
  577.           and put only resource files there. Otherwise you might confuse
  578.           PostScript programs using resourceforall to do more than just
  579.           enumerating resource names.
  580.  
  581.           There is no serious duplicate checking while building the file
  582.           list. So if you have the same font file names in different
  583.           directories listed in the path, chances are high that they are
  584.           both listed.
  585.  
  586.           Another side effect is that resources with a name longer than the
  587.           filesystem supports cannot be listed correctly without
  588.           preregistering them. Consider this example:
  589.           (HelveticaNeue-UltraLightItalic) can be
  590.           (HelveticaNeue-UltraLightItal) to a filesystem, because the
  591.           maximum filename length is exceeded. While preregistering the
  592.           full resource name with the partial filename will solve this
  593.           problem for findresource, the automatic lookup via the path will
  594.           not give usable results. The disk scan will return the incomplete
  595.           filename as resource name.
  596.  
  597.           So if you use the new path environment variables:
  598.  
  599.             1. Watch out for filenames that are too long. Preregister those
  600.                resources.
  601.             2. Watch out for non resource files that might get in the way.
  602.             3. If you do need alias names, use filesystem hardlinks to make
  603.                them.
  604.  
  605.           Of course resourceforall still can't handle any tricks that you
  606.           might want to play via /ResourceFileName. But this shouldn't be a
  607.           limitation and /ResourceFileName stunts should not be necessary
  608.           anymore anyway. I discourage using /ResourceFileName now.
  609.  
  610.           I put so much "automatic lookup" into the resource mechanism that
  611.           anyone who wants to complain about missing features should have a
  612.           _very_ good reason to bother me.
  613.  
  614.           NB: Playing these stunts wasn't exactly easy. So if you want to
  615.               do something good for me in return, buy a "Sonata" music font
  616.               as gift and send it to me. I'd have good use for this font.
  617.  
  618.         - Illegal type 3 encodings that do not use names should work again.
  619.  
  620.           NB: This violates Adobe specs, and I will not guarantee that
  621.               these illegal encodings continue to be accepted.
  622.  
  623.     22.18 HWG beta 3 release
  624.  
  625.     22.19 HWG
  626.  
  627.         - Changes to the library setup code to make an easy name change to
  628.           e.g. "hwgpost.library" possible.
  629.  
  630.     22.20 HWG hwgpost.library special release
  631.  
  632.         - Due to a rather reasonable problem report, I decided to put
  633.           "callextfunc" back in. It is now there as "@callextfunc" in
  634.           disguise with some better setup work for the called function.
  635.           Note that I still discourage any use of this function. Let me
  636.           point again to @calluserhook. See HWGPOSTlib.doc for details.
  637.           This stuff needs to be tested.
  638.         - All the composite font stuff is in now. Rather limited testing.
  639.           Nested composite fonts not tested at all because I don't have any.
  640.           Actually I don't have any composite fonts, just the one I hacked
  641.           up myself for testing. Some FMapTypes tested, some not. I need
  642.           examples and feedback here. I wouldn't mind you guys filling up
  643.           my font library in exchange for giving you these features.
  644.  
  645.           I still hope to find a Sonata font in my smail eventually, too.
  646.  
  647.         - rectclip did not do a newpath.
  648.         - execform is now available. Due to memory considerations, no
  649.           caching is currently done.
  650.         - The image operators should finally take files as data sources.
  651.           While this is currently rather slow, at least it seems to
  652.           work quite well. So don't complain. I might eventually get around
  653.           to improve it a lot, but without incentive to do so, not much will
  654.           happen here.
  655.         - There wasn't a chance that the image operators worked with 12 bit.
  656.           Now there is. Note that image rendering is slower now because
  657.           of this. Also a one color image source wasn't working correctly
  658.           with a non gray colorspace. While rendering images takes now
  659.           twice as much memory (8 bytes * pixels per page line), all sample
  660.           mangling problems should be solved now. Also the Indexed color
  661.           space should now be usable with the image operators.
  662.         - Interesting enough it seemed that arrays in global VM could
  663.           potentially still be affected by save/restore combinations. Due
  664.           to changes in the VM system for implementing startjob, this
  665.           should never happen again.
  666.         - The interpreter checks for abort signals now while doing image
  667.           data processing. Helps a lot with stopping unwanted 1MB images
  668.           coming in via files and filters. ;^)
  669.         - Added a UseStdIO option to the post frontend. If you use it, post
  670.           will use its own standard shell console filehandles and pass them
  671.           to the library as standard I/O instead of using the interactive
  672.           window of the screen display. Note that the interactive window
  673.           will still be opened. It won't be used for I/O though.
  674.         - Somewhere along the lines I had changed frontend behaviour to
  675.           open a screen if neither iff, screen, nor printer was specified.
  676.           Now the old behaviour of doing a silent "printer" is back.
  677.           Also using the BW/RGB/CMYK gadgets was broken.
  678.         - =string should behave like in Adobe implementations now.
  679.         - Changed the default prompt to "PS>".
  680.         - Added startjob, PSFLAGJxJOBSERVER. Changed the meaning of
  681.           PSFLAGSAVE.
  682.  
  683.           The new meaning of flags for PSintstring():
  684.  
  685.             PSFLAGSTARTJOBSERVER:   force a successful startjob with
  686.                                     a "false" operand before interpreting
  687.                                     the file or string.
  688.  
  689.             PSFLAGENDJOBSERVER:     force a successful startjob with
  690.                                     a "true" operand after interpreting
  691.                                     the file or string. This works like a
  692.                                     major cleanup.
  693.  
  694.             PSFLAGSAVE              Do both of the above.
  695.  
  696.           With PSFLAGSAVE you can easily run many encapsulated jobs. With
  697.           the other two flags you can do multiple calls to PSintstring()
  698.           for one job. You have to use PSFLAGSTARTJOBSERVER on the first
  699.           call and PSFLAGENDJOBSERVER on the last call to PSintstring()
  700.           then. You can't nest this and you should not make any special
  701.           assumptions.
  702.  
  703.           startjob won't work if the PSFLAGSAVE or PSFLAGSTARTJOBSERVER
  704.           have not been used since the setup or the last PSFLAGENDJOBSERVER
  705.           or PSFLAGSAVE. That is, the current context must support job
  706.           encapsulation.
  707.  
  708.         - Under rather peculiar circumstances the halftone mechanism failed
  709.           because of a loop check that could be wrong by one. If the
  710.           internal halftone memory needs met in a specific, rather
  711.           complicated way with the HT memory size and the previous memory
  712.           use up to that point, a wrong cache screen was generated. Just
  713.           another variation of the "0 to n" instead of "0 to n-1" problem
  714.           that has been in there since pre 1.7 days.
  715.         - serverdict and exitserver are now built in.
  716.         - statusdict is built in and some of the init.ps statusdict
  717.           operators are built in now, too. Note that this stuff is
  718.           implementation dependent and that I might do what I want with it.
  719.           So you better adhere to Adobe specs and forget about statusdict
  720.           as far as possible.
  721.         - When the first init file is run, the default VM allocation mode
  722.           should be local now for sure. This should make many applications
  723.           a lot safer.
  724.         - user object functions now do better type checking.
  725.  
  726.     22.21 HWG The "startjob" version
  727.  
  728.         - Major rework of all stack access code. This will make it easier
  729.           to possibly add dynamic stack sizing and some other internal
  730.           stuff and while it seems totally unrelated it might come in
  731.           handy for a future setpagedevice. As a side effect the library
  732.           seems to be faster for most non rendering operations. These
  733.           changes affected most of the sources though, so they classify as
  734.           ENORMOUS REWORK. It seems right now that I did not break
  735.           anything, but we'll see about that.
  736.  
  737.     22.22 HWG The "new stack stuff" release
  738.  
  739.         - rectclip still did not work right. It set the clipping path
  740.           correctly and then just cleaned it out again. Hmpfh.
  741.         - A document created by the Interleaf publisher showed me that
  742.           currentfile must return a literal file object. Since the
  743.           beginning of time it had always returned an executable file
  744.           object. A nice guy from Adobe confirmed this change to be the
  745.           right thing to do.
  746.         - Cleaned out some confusing code in the interpreter loop.
  747.         - Note that the systemparam operators are _very_ rudimentary and
  748.           mostly noops. They are not fully implemented yet and the stuff
  749.           implemented is only to make startjob/exitserver basically
  750.           possible. I plan to fix this for the next public release.
  751.         - Scanning of <~ASCII85~> was broken. Should be working now.
  752.           Implementing the ASCII85 filters still has to wait a little,
  753.           though.
  754.         - If the image operator data sources were prematurely exhausted,
  755.           the operand stack wasn't cleaned up correctly. Tss. Always the
  756.           image operator.
  757.         - Prepared for true 8 bit CMYK handling by adding new bitplane
  758.           pointers. A depth of up to 32 should now be ok. One problem with
  759.           all this depth stuff is, that I can only test gray scale
  760.           rendering with other depths than one with reasonable ease. As my
  761.           A3k is ECS, I can only check on 1 bit per color RGB or CMYK
  762.           displays. As the shading and rendering for multiple colors is
  763.           absolutely identical to the calculations for a one color display,
  764.           this should theoretically not be a problem. If you experience any
  765.           problems with more than 1 bpc and RGB or CMYK displays, _you_
  766.           need to help me. I can't afford to buy an AA machine or a
  767.           graphics card + monitor.
  768.         - Moved path handling and matrix calculations into own source files.
  769.           gstate handling is something really strange. I'll need to clean
  770.           this up for pagedevice handling.
  771.         - Added a debugging command to help all those with strange rendering
  772.           problems: @dumprenderinfo. This command will put out on %stdout
  773.           some information about what any rendering with the current gstate
  774.           values would do to the planes. If you have any rendering problems
  775.           that you can't solve, I will need the output of this command to
  776.           help you!
  777.         - Added some safety checks to color and shade handling that should
  778.           indicate if something goes wrong without hurting performance.
  779.           This is just paranoia though. Nothing actually went wrong yet.
  780.         - Added HWGPOST_DEVB_INVERTOUTPUT. This inverts all shades before
  781.           setting up rendering into bit planes. What does this mean?
  782.           Without this flag a 100% color value (e.g. white) will cause 0
  783.           bits in the planes and 0% color (e.g. black) will cause 1 bits.
  784.           This choice had been made because typically there is less black
  785.           on a page than white, and setting bits is generally more time
  786.           consuming than zeroing out memory. This is kind of ugly though
  787.           for color rendering because one needs to set up an "inverted"
  788.           color table. With the new flag all output shades x are converted
  789.           into "1.0 - x" before they are used for rendering. This in effect
  790.           will cause a negative image where 0% color will cause 0 bits.
  791.           The hacked post frontend got an InvertOutput option to test this.
  792.  
  793.     22.23 HWG The "better graphics" release
  794.  
  795.         - If one specified a 0 to 360 degrees arc (a circle), the last
  796.           point generated would be a in effect postitioned in a position >
  797.           360 degrees which was "beyond" the first point. A closepath would
  798.           cause a path segement then working backwards which messed up the
  799.           join at this point because the joining mechanism (correctly) made
  800.           a join for a ~180 degree turnaround. You could notice this for
  801.           stroked full arcs with big linewidths when the arc did not seem
  802.           to be correctly closed. The bug was due to additive rounding
  803.           errors inside arc generation which made it exceed the 360 degree
  804.           limit internally by a rather tiny fraction. Can't happen anymore.
  805.         - The hex and rle filters do a read ahead for EOF now to make
  806.           them work better with image ops. I'll have to implement this
  807.           for filters in general though to be R&W book compliant.
  808.         - I decided to make this available as beta 4 now, even though
  809.           I haven't finished the setsystemparams implementation as I
  810.           originally planned to do. It'll be in the in the beta 5.
  811.           Sorry.
  812.  
  813.     22.24 HWG beta 4 release
  814.  
  815.         - I have been working on a datatype for HWGPOST based on an
  816.           idea by Swen K. Stullich. As his code was not usable for me
  817.           at all, I wrote new stuff. The data type handles PS
  818.           recognition via "%!" and renders the picture in B&W. It also
  819.           tries to obey any BoundingBox or Orientation header comment.
  820.         - The library now understands how to handle DOS EPS files with a
  821.           binary header. It will automatically read the PostScript code
  822.           embedded. This is not a performance hit for normal files except
  823.           for the first character read from a file. In fact, true ASCII
  824.           files should be read slightly faster than before now.
  825.           Why this before setsystemparams? To be able to enhance the
  826.           datatype now which seems to have more appeal.
  827.         - The simple HWGPOST datatype knows about DOS EPS files now. It
  828.           will now try to display something even if the [E]PS files did not
  829.           have a showpage. It also has much more robust PS file
  830.           recognition. Thanks to Tony for the push to make this
  831.           better.
  832.         - The library should no longer behave strange if you pass NULL
  833.           filehandles. Note that it was _never_ acceptable to pass NULL
  834.           filehandles to the library for %stdin, %stdout, and %stderr.
  835.           It is still not acceptable. This is only a kludge to make broken
  836.           SW work right.
  837.         - With this entry, I break the magic 1k line History mark.
  838.  
  839.             "Eine Flasche Sekt!"
  840.  
  841.         - The internal definefont handling did not allow multiple keys per
  842.           font dictionary as possible in Level 2. Fixed.
  843.         - cvi and cvr are now a little less strict about input. They should
  844.           handle one trailing space now. This is an important change and
  845.           fixes some documents.
  846.         - Added some very heavy magic to fix stone age FreeHand documents
  847.           that break documented Level 2 compatibility. I sure hope I got
  848.           this right. It seems to work though.
  849.         - datatypes.library seems to presort the filetypes in some
  850.           arrogant way without regard to the descriptor files. This
  851.           always messed up handling of the datatype descriptor. I
  852.           could not figure out the exact problem. Annoyed as I was, I
  853.           took the brute force approach and use two descriptor files.
  854.           One for ASCII files, and one for binary files.
  855.         - The datatype no longer has problems with negative values in the
  856.           bounding box comment. It also stops scanning when it finds an
  857.           %%EndComments. It also sets up the color map correctly, so that
  858.           clips out of multiview will now show up in a nice and colorful
  859.           way instead of black.
  860.         - The datatype behaves _much_ better now in low memory
  861.           conditions.
  862.         - The datatype now optionally handles color displays,
  863.           densities and other default sizes. How? Via a new
  864.           environment variable: "ENV:HWGPOST/DATATYPECONFIG"
  865.  
  866.           The first line of this environment variable is evaluated in
  867.           DOS ReadArgs() style with this template:
  868.  
  869.               COLORS/K/N,BPC/K/N,XDEN/K/N,YDEN/K/N,DENSITY/K/N,
  870.               DEFWIDTH/K/N,DEFHEIGHT/K/N
  871.  
  872.             COLORS:     Either 1 or 3. Only B&W or RGB supported!
  873.             BPC:        Bits per color. Anything from 1 to 8. Note
  874.                         that BPC*COLORS must be <= 8 or strange things
  875.                         may happen due to the OS limit of 8 bitplanes.
  876.             XDEN,YDEN:  Densities (dpi). Default is 75 dpi.
  877.             DENSITY:    Convenience operator to set both densities.
  878.             DEFWIDTH,
  879.             DEFHEIGHT:  If no bounding box is specified in the file,
  880.                         these values are used. You need to specify
  881.                         them in units of 1/100 inch though, not in
  882.                         1/72 inch like PostScript likes it. The
  883.                         default values for these parameters will give
  884.                         an A4 like bitmap size.
  885.  
  886.            This environment variable should do the job for a while.
  887.  
  888.         - Tricky behaviour change to make library use for programmers
  889.           easier. It has always been permissible to set the kill flag on
  890.           the copypage/showpage callback to abort the interpreter run
  891.           synchronously. showpage will now skip the erasepage if it finds
  892.           the kill flag set. Thus it is possible now to abort the library
  893.           run on a successful showpage without the need to redefine
  894.           showpage or copy the bitmap away into some backup place to save
  895.           it from being erased. Nifty, eh?
  896.         - Even better protection against endless error looping now.
  897.         - Interesting enough the SAS/C 6.51 floor() and ceil()
  898.           implementations in scm881.lib will crash when you pass a 0
  899.           NaN to them. This could happen if someone caused the CTM to
  900.           be a e.g. 0 matrix. Then matrix inversions would give NaN
  901.           results which killed the interpreter immediately due to the
  902.           SAS/C bug. I put in some protection into the most relevant
  903.           floating point calculations to circumvent this problem.
  904.         - The post frontend should accept negative values in the SIZE
  905.           option now.
  906.         - Ouch. Due to the internal changes done for the beta 4, the
  907.           PSsetdevice() interface broke completely. No workaround for
  908.           the beta 4. Fixed now. Sorry.
  909.         - Magic added for default font lookup. If the search for a
  910.           font fails, the interpreter will try to find
  911.           /@DefaultFontName as font. The updated init.ps shows how to
  912.           define a dummy default font. If you like any other font as
  913.           default font, e.g. /Courier, just set /@DefaultFontName to
  914.           /Courier.
  915.  
  916.     22.25 HWG beta 5 release
  917.  
  918.         - pathbbox returned garbage for rotated coordinate systems. Why
  919.           didn't anyone (including me!) notice this before? This must have
  920.           been a problem for a long time. This will be the reason for
  921.           a beta 6 to come out RSN.
  922.         - Color values out of range should now be silently adjusted as
  923.           described by the R&W book.
  924.         - The datatype did not compute width and height of the bounding box
  925.           correctly. It does now, though it won't handle "(atend)".
  926.         - The datatype will give an error message now instead of an error
  927.           number.
  928.  
  929.     22.26 HWG beta 6 release
  930.  
  931.         - Added PSFLAGRUNSTDIN to make a simple run on the passed input
  932.           filehandle as currentfile possible.
  933.         - The interpreter no longer complains on an empty file with an
  934.           ioerror. it will now simply do nothing if it gets an EOF right
  935.           away.
  936.         - Created the new prtpost-handler for PRTPS:. It should behave
  937.           like a no thrills B&W PostScript printer. Page size and
  938.           densities are taken from the printer gfx prefs. Do not
  939.           forget to set the image dimensions to something other than
  940.           "Ignore"! It is _very_ rudimentary and actually just a hack
  941.           to test a few things. It probably won't work for you.
  942.         - exitserver can now be invoked when there is no job server
  943.           encapsulation active. It used to cause an error.
  944.           I put this in to make (lousy!) fonts invoking it work.
  945.         - It should now be possible to change the stack sizes
  946.           via setuserparams. No dynamic resizing yet!
  947.         - The datatype now uses BestModeID() to suggest a display
  948.           mode. This should hopefully help some users. Actually there
  949.           is more to it. It works like this:
  950.  
  951.             1. Check the config paramter MODEID in the
  952.                HWGPOST/DATATYPECONFIG environment variable. If it is
  953.                set, take it as hex value for the mode id.
  954.  
  955.                 Example: "MODEID=41000" for the A2024 in 10Hz mode.
  956.  
  957.             2. If no modeid set yet, try BestModeID()
  958.  
  959.             3. If no modeid set yet, use the default monitor.
  960.  
  961.           So even if BestModeID() doesn't do what you want you can
  962.           override it with the MODEID setting.
  963.         - Even when a buggy mathieeedoubbas.library is used, truncate
  964.           should no longer give strange results for 0.
  965.         - Negative arguments for setlinewidth should be ok now.
  966.         - When I put in the composite font machinery I messed up
  967.           glyphshow handling. This is fixed again.
  968.         - The C= math libs have a rounding problem if a 68881 is
  969.           installed. This shows when you start mixing single
  970.           and double precision math. It also conflicts with e.g. the
  971.           SAS 68881 inline code (which is better). If these two are
  972.           used together, e.g. an application using one mode using
  973.           post.library compiled with the other, rounding will not work
  974.           correctly. Again, a similar problem appears if
  975.           mathieeesingbas.library is opened after
  976.           mathieeedoubbas.library. You don't even have to use
  977.           post.library to get rounding errors.:-( I can't do much
  978.           about this in the library. A general fix for the C= libs is
  979.           required.
  980.  
  981.           Well, I did something about the math I use in the library.
  982.           The actual PostScript interpreter will run in a separate
  983.           process now. When you call PScreateact(), you create an
  984.           interpreter process cloning your task priority. All
  985.           interpreter floating point math is now done in that
  986.           interpreter process which is of course absolutely
  987.           independent. VoilĂ , no more problems with rounding errors!
  988.  
  989.           Notes:
  990.  
  991.             1. SAS FPU inline math uses "round to nearest"
  992.             2. C= IEEE libs _currently_ use "direct rounding ==
  993.                towards zero".
  994.  
  995.           Remember this when choosing the post.library version to use.
  996.  
  997.           Note that the callbacks like flushfunc, copyfunc or callextfunc
  998.           and/or the Hook will still run on your task context, i.e. while
  999.           they are caused by the interpreter process, they don't use that
  1000.           context. Don't ask how tricky it was to implement this without
  1001.           violating callback compatibility including error handling.
  1002.           PLEASE TEST THIS IN DETAIL!
  1003.  
  1004.           Currently, the interpreter process does not install any FP trap
  1005.           handling for an FPU. The library should not cause any
  1006.           math traps like division by zero. Please tell me if you see
  1007.           this as a problem.
  1008.  
  1009.           CAVEAT: Invoking a callback like e.g. flushfunc will now result
  1010.           in at least two additional task switches and some message
  1011.           passing. In effect, this slows down any [flushfunc]
  1012.           callback. This can noticably affect interpreter speed. So if
  1013.           you don't require flushfunc, set it to NULL for optimal
  1014.           performance of the interpreter!
  1015.  
  1016.           I wasn't able to check on all the different applications using
  1017.           post.library. ALL OF THE ABOVE NEEDS LOTS OF TESTING! NOTE THIS
  1018.           WELL!
  1019.         - Octal output by e.g. pstack wasn't done correctly. Should be
  1020.           fixed now.
  1021.         - The optimized rendering function for characters rendered trash to
  1022.           the right of a character that fell of the left side of the page.
  1023.         - A null type in the Encoding of a font is now taken as
  1024.           /.notdef to fix some broken apps.
  1025.         - Cleaned up the scanner a little bit. Strings handling should be
  1026.           done a little better now. Not that it matters in speed, though.
  1027.         - The image operators still did not conform to the R&W book
  1028.           with respect to the actual pixels rendered. This should
  1029.           be better now. I also found a nasty bug in rendering
  1030.           code. Still wondering why it didn't crash all the time.
  1031.         - Major rework of floating point handling inside the library. All
  1032.           the internal math is now done via single precision
  1033.           arithmetic except for some places in clipping and filling
  1034.           where double precision is needed due to the nature of the
  1035.           calculations involved. With minor changes I could even be
  1036.           supporting FFP internally again now without major rework
  1037.           of the library. I don't want to move away from IEEE math,
  1038.           though. Default is currently either
  1039.           mathieeesingbas.library or inline PFU code.
  1040.         - I hacked up setbbox to include a slightly larger area
  1041.           than the numbers tell us. Some PS files shave it so close
  1042.           that the floating point fuzz in lower digits could push
  1043.           the bounding box check over the edge for nothing. Note
  1044.           that this is only a hack to keep some PS files alive!
  1045.         - If /StdHW and /StdVW were present in a type 1 font as
  1046.           empty arrays, HWGPOST rejected the font. Now empty arrays
  1047.           will be treated as "not present". HWGPOST will also
  1048.           ignore anything beyond an end type hunk inside an IBM
  1049.           style type 1 file. This fixes fonts like BrushScript
  1050.           which, among other things, don't really conform to the
  1051.           black book specs. How I hate these hacks around messy fonts.
  1052.         - Reworked PRTPS: and my hacked up post frontend a bit.
  1053.           Finally they should be able to determine the dump size
  1054.           correctly without any need to fiddle with the printergfx
  1055.           prefs.
  1056.         - Maybe I shouldn't include the PRTPS: handler. It is so
  1057.           lousy IMHO and I haven't even really tested it. Oh well.
  1058.           I've warned you.
  1059.         - Reworked the image operator again. It messed up
  1060.           coordinates. I am not sure if it now behaves according to
  1061.           the book yet. This will need _some_ amount of testing.
  1062.           You say I should be able to tell if it works from the
  1063.           algorithm I use? You wish. There is tons of math involved
  1064.           and I have to get around the peculiarities of the
  1065.           different math options. It is not at all easy to identify
  1066.           a problem here! It probably still doesn't work right.
  1067.         - With the math change I seem to have messeup clipping and
  1068.           stroking. It is dead slow. Hmm. Maybe it is flattenpath.
  1069.           I'll have to check that.
  1070.         - Reworked tricky parts of all the math again. Single
  1071.           precision was not enough for some things, so double
  1072.           precision is used now, too. Clipping and filling needs
  1073.           double precision in certain places to get line
  1074.           intersections correct. It ain't easy...
  1075.         - charpath could lead to unwanted results for filled paths.
  1076.           This should be fixed now.
  1077.         - I messed up stroking when doing all the math changes.
  1078.           Fixed.
  1079.         - Actually strokepath is a mess internally. It doesn't
  1080.           really produce an outline of the stroked path, but a
  1081.           sequence of outlines for the individual path elements. It
  1082.           needs to be rewritten from scratch to put out a true
  1083.           outline. This is not an easy task though.
  1084.         - The Separation color space worked backwards for all color
  1085.           separations, e.g. (Magenta) made HWGPOST ignore the
  1086.           Magenta separation instead of producing it. It
  1087.           also didn't affect the shade settings at the right time,
  1088.           i.e. it didn't really work at all. Currently, you can
  1089.           only use the color separation names if HWGPOST is
  1090.           configured for the appropriate color model, i.e. if you
  1091.           chose a three gun RGB output on starting up HWGPOST, the
  1092.           Cyan, Magenta, Yellow, and Black separations are not
  1093.           available. The R&W book is a little confusing here, so I
  1094.           am not sure if Separation behaviour is up to specs. it is
  1095.           not tested that well anyway.
  1096.  
  1097.     22.28 HWG beta 7 release
  1098.  
  1099.         - I added automatic Interpreter stackextension to the
  1100.           library. The exec, operand, and dictionary stacks should
  1101.           now automatically be enlarged whenever new entries are
  1102.           needed and no user parameter limits are set. There is an
  1103.           upper limit of 30K elements per stack and stacks won't
  1104.           shrink automatically! Another step towards Level 2 PS.
  1105.         - Ouch. There was a hinting bug in the font code. A
  1106.           comparison did not ignore the sign of the values involved
  1107.           when it should have done so. This messed up e.g. the
  1108.           Baghdad font where characters where literally hinted to
  1109.           death.
  1110.         - Note that if you use an 68040, you will most likely have
  1111.           to install a mathieeesingbas.library patch from Aminet
  1112.           for <= OS 3.1. Otherwise HWGPOST will most likely crash
  1113.           your machine as it depends on a working
  1114.           mathieeesingbas.library since the beta 7 version.
  1115.         - Color default halftone angles are now 105 75 90 45. They
  1116.           used to be 105 75 95 45 for some reason.
  1117.         - There was an oversight within the directory scanning
  1118.           functions used internally. Now patterns should be
  1119.           processed correctly.
  1120.         - Making tricky assumptions about the image operator will
  1121.           currently fail. An image might be misplaced by one pixel
  1122.           in device space if you try to compensate for exactly this
  1123.           in your PS code. This might affect dvips users. Sorry
  1124.           about that. I'd need to rewrite image positioning, and
  1125.           believe me, I tried once already and failed. This needs
  1126.           more research and planning. It'll get there, but not
  1127.           right now.
  1128.  
  1129.     22.29 HWG internal
  1130.  
  1131.         - The global checks for gstate objects were not complete.
  1132.           This could mess up VM handling.
  1133.         - Each VM allocation needs four bytes more now. What you
  1134.           get in return? garbage collection and better vm
  1135.           save/restore handling. VMThreshold is 100KB and automatic
  1136.           garbage collection is turned on as default. As always,
  1137.           I recommend at least OS 3.1 and SetPatch 40.16.
  1138.           The garbage collection can be turned off as desribed in
  1139.           the R&W book via "-2 vmreclaim".
  1140.         - vmreclaim does a rangecheck now.
  1141.         - There was a nasty bug in VM management of dictionaries.
  1142.           If a dictionary got saved by the VM handler and expanded
  1143.           afterwards, the restore operation would not always produce
  1144.           what you wanted.
  1145.         - name comparisons should be a lot more efficient now.
  1146.           This could actually compensate for most of any slowdown
  1147.           by the more complex VM handling.
  1148.         - A problem in setting up cached names for image handling
  1149.           fixed. This could have produced dangerous garbage and
  1150.           messed up handling of image dictionaries.
  1151.         - All cached VM references should now be handled safely.
  1152.           Unreferenced objects should be flushed automatically now.
  1153.         - During implementation of the garbage collection quite a
  1154.           few VM handling inconsistencies popped up. These should
  1155.           be fixed now. The interpreter might be slightly slower
  1156.           now when it comes to VM handling. I exchanged speed for
  1157.           robustness here.
  1158.         - Note that a garbage collection will only happen at
  1159.           instruction "boundaries", as during instruction execution
  1160.           VM may be in an intermediate, instable state for
  1161.           performance reasons. This means that you can still run
  1162.           out of memory in certain cases.
  1163.         - Note also that vmthreshold is evaluated. This means that
  1164.           sometimes rendering will pause for a very little while
  1165.           because the garbage collection has been triggered. The
  1166.           default value for vmthreshold is now 200000.
  1167.           Usually the pause is not caused by the garbage collector
  1168.           but by freeing the collected memory.
  1169.         - There was a bug in setting up cached names for image
  1170.           dictionary handling. This could have produced errors when
  1171.           using image dictionaries.
  1172.         - I added an operator @setpatterncachemax to be able to
  1173.           change the previously fixed upper limit of 60KB per
  1174.           pattern for testing VM via a demanding and pattern using
  1175.           file. As you can see, this is an internal operator. The
  1176.           method to set this might change in the future when I have
  1177.           decided on a general way to set parameters.
  1178.         - $error will no longer be handled via internally cached
  1179.           stuff. Now the dictionary is actually used as you would
  1180.           expect it to be. The caching was not safe and could
  1181.           result in stale data confusing VM handling.
  1182.         - Added =print operator. It behaves like "=" without
  1183.           printing a newline. This is to support some Adobe error
  1184.           handler code.
  1185.         - I reworked init.ps to set up a few more dummy operators
  1186.           for statusdict and page sizes. This should help quite a
  1187.           few PS files.
  1188.         - enumfonts.ps should ignore AFM's now. Those shouldn't have
  1189.           been placed into PSFONTS: anyway.
  1190.         - There were quite a few subtle problems with
  1191.           stop/stopped/run/eexec error handling. These should
  1192.           hopefully be fixed now.
  1193.         - The interpreter will no longer be caught in an endless
  1194.           loop when it encounters objects where the executable
  1195.           attribute is meaningless.
  1196.         - Resource operators could really take the machine down
  1197.           on errors due to a missing variable setup.
  1198.         - The interpreter runs on an 8KB stack now.
  1199.         - "quit" should behave according to spec now. This means
  1200.           that you need "systemdict begin quit" to leave the
  1201.           interactive context now.
  1202.         - It took me about two weeks and an analysis of a 3MB PS
  1203.           file to find a very strange bug in the garbage collection
  1204.           concept. Basically it was an oversight which caused
  1205.           spurious memory messups. During testing it turned out
  1206.           that the time needed for garbage collection is truly not
  1207.           that long at all. Most time is needed for actually
  1208.           allocating and freeing memory. The pools should help. So
  1209.           there shouldn't be much of a negative impact caused by
  1210.           the new functionality.
  1211.         - Strange enough, while testing with that 3MB file I found
  1212.           out that an 040/40 with HWGPOST will process B&W image
  1213.           data and render it _a_lot_ faster than an HP4M accepts
  1214.           and handles it. Even though some of this may be
  1215.           attributed to lousy configuration of my parallel.device
  1216.           setup, the HWGPOST image operator can't be all that bad.
  1217.           :-)
  1218.         - flattenpath had problems with degenerate bezier curves
  1219.           where all points were extremely close together. Usually
  1220.           this happened on scaling large EPS images very small onto
  1221.           the page and showed only on certain math options due to
  1222.           rounding differences.
  1223.         - At this time, fonts using "exitserver" will most likely
  1224.           fail with an invalidrestore error. Most likely this won't
  1225.           change in the near future. You should get fixed fonts.
  1226.         - The error callbacks of the library were not really
  1227.           functional. They should do the job now.
  1228.  
  1229.     22.31 HWG beta 8 release
  1230.  
  1231.         - Any string passed to the interpreter was in local memory
  1232.           with the new VM handling. This could result in
  1233.           invalidrestore errors. The string will now be allocated
  1234.           in global memory. This should fix SpecialHost of PasTeX
  1235.           and dvips.
  1236.         - LZWDecode is in there. LZWEncode will be publically
  1237.           available wihtout returning an error as soon as someone
  1238.           talks to Unisys. The filter should support the PDF
  1239.           extensions, even though this has not been tested.
  1240.         - I included a general fix for mathieeesingbas.library now.
  1241.           MathSingFix should get rid of the 8000000B gurus with
  1242.           non-FPU and 68040 systems.
  1243.         - Some doc updates like removing many empty lines in this
  1244.           document.
  1245.  
  1246.     22.32 HWG beta 9 release
  1247.  
  1248. *** EOT  ***
  1249.  
  1250.